<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8"/>
    <link rel='stylesheet' href='../public/stylesheets/index.css'/>
    <style>
        /*td:hover {*/
            /*background: #00ff00;*/
        /*}*/
    </style>
</head>
<body>
<header>
    <div class="headerLeft">
        <img src="../public/images/znxl.png" alt="">
        <p>证念心理</p>
    </div>
    <div class="headerRight">
        <img src="../public/images/login.png" alt="">
        <p>马上登陆</p>
    </div>
</header>
<section>
    <!---->
    <div class="sectionList">
        <ul style="width:200px">
            <li onclick="getSheet('backStage-users',{page:0,limit:20},{
                '账单':(token)=>{
                    let data = getMap(token);
                    getSheet('backStage-bills-user',{page:0,limit:20,uid:data['uid']}).then(res=>{$('#titleName').text('用户账单表');})
                    },
                '订单':(token)=>{
                    let data = getMap(token);
                    getSheet('backStage-orders',{page:0,limit:20,type:'consumer',uid:data['uid']}).then(res=>{$('#titleName').text('用户订单表');})},
            }).then(res=>{
                $('#titleName').text('用户管理('+res.args.count+')');
                model = '';
            })">
                <img src="../public/images/dhtp.png" alt="">
                <p>用户管理</p>
            </li>
            <li onclick="getSheet('backStage-consultants',{page:0,limit:20},{
                '账单':(token)=>{
                    let data = getMap(token);
                    getSheet('backStage-bills-receiver',{page:0,limit:20,uid:data['uid']}).then(res=>{$('#titleName').text('咨询账单表('+res.args.count+')');})
                    },
                '订单':(token)=>{
                    let data = getMap(token);
                    getSheet('backStage-orders',{page:0,limit:20,type:'receiver',uid:data['uid']}).then(res=>{$('#titleName').text('咨询订单表('+res.args.count+')');})},
                '提现':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-withdraws',{uid:data['uid'],money:data['balance'],password:123456}).then(res=>{
                        if(res.error){
                            alert(res.error);
                        }else {
                            alert(`提现成功,本次提现:${res.args.balance}元`);
                        }
                    });
                },
            }).then(res=>{
                $('#titleName').text('咨询师管理('+res.args.count+')');
                model = '';
            })">
                <img src="../public/images/dhtp.png" alt="">
                <p>咨询师管理</p>
            </li>
            <li onclick="getSheet('backStage-bills-user',{page:0,limit:20}).then(res=>{
                $('#titleName').text('用户账单表('+res.args.count+')');
                model = '';
            })">
                <img src="../public/images/dhtp.png" alt="">
                <p>用户账单表</p>
            </li>
            <li onclick="getSheet('backStage-bills-receiver',{page:0,limit:20}).then(res=>{
                $('#titleName').text('咨询账单表('+res.args.count+')');
                model = '';
            })">
                <img src="../public/images/dhtp.png" alt="">
                <p>咨询账单表</p>
            </li>
            <li onclick="getSheet('backStage-orders',{page:0,limit:20}).then(res=>{
                $('#titleName').text('全部订单('+res.args.count+')');
                model = '';
            })"><img src="../public/images/dhtp.png" alt="">
                <p>全部订单</p></li>
            <li onclick="getSheet('backStage-consult-admission',{page:0},{
                '同意':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-consult-admission-examine',{id:data['id']}).then(res=>{
                        alert('操作成功');
                    });
                },
                '不同意':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-consult-admission-examine',{id:data['id']}).then(res=>{
                        alert('操作成功');
                    });
                },
            }).then(res=>{
                $('#titleName').text('咨询师入驻('+res.args.count+')');
                model = '';
            })"><img src="../public/images/dhtp.png" alt="">
                <p>咨询师入驻</p></li>
            <li onclick="getSheet('backStage-company-member',{page:0},{
                '同意':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-company-member-examine',{id:data['id']}).then(res=>{
                        alert('操作成功');
                    });
                },
                '不同意':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-company-member-examine',{id:data['id']}).then(res=>{
                        alert('操作成功');
                    });
                },
            }).then(res=>{
                $('#titleName').text('单位会员入驻('+res.args.count+')');
                model = '';
            })"><img src="../public/images/dhtp.png" alt="">
                <p>单位会员入驻</p></li>
            <li onclick="getSheet('backStage-user-member',{page:0},{
                '同意':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-user-member-examine',{id:data['id']}).then(res=>{
                        alert('操作成功');
                    });
                },
                '不同意':(token)=>{
                    let data = getMap(token);
                    ServerAgent.invoke('backStage-user-member-examine',{id:data['id']}).then(res=>{
                        alert('操作成功');
                    });
                },
            }).then(res=>{
                $('#titleName').text('个人会员入驻('+res.args.count+')');
                model = '';
            })"><img src="../public/images/dhtp.png" alt="">
                <p>个人会员入驻</p></li>



            <li onclick="getSheet('backStage-videos',{page:0},{
                '编辑':(token)=>{
                    let data = getMap(token);

                },
            }).then(res=>{
                $('#titleName').text('视频('+res.args.count+')');
                model = 'video';
            })"><img src="../public/images/dhtp.png" alt="">
                <p>视频</p></li>
            <li onclick="getSheet('backStage-books',{page:0},{
                '编辑':(token)=>{
                    let data = getMap(token);
                },
            }).then(res=>{
                $('#titleName').text('书籍('+res.args.count+')');
                model = 'book';
            })"><img src="../public/images/dhtp.png" alt="">
                <p>书籍</p></li>
            <li onclick="showFragment('views/essay.html')"><img src="../public/images/dhtp.png" alt="">
                <p>心理文章</p></li>
            <!--<li><img src="../public/images/dhtp.png" alt="">-->
                <!--<p>新闻编辑</p></li>-->
            <!--<li><img src="../public/images/dhtp.png" alt="">-->
                <!--<p>学会天地导航</p></li>-->
            <!--<li><img src="../public/images/dhtp.png" alt="">-->
                <!--<p>单行文字</p></li>-->
            <!--<li><img src="../public/images/dhtp.png" alt="">-->
                <!--<p>单行文字</p></li>-->
        </ul>
    </div>

    <div class="sectionMain">
        <iframe id="external-frame" style="height:800px;width:100%" src="../frame/operate/essay/index.html" frameborder="0"></iframe>
    </div>
</section>
<footer>
    <div id="barcon" name="barcon"></div>
</footer>
<script src="../frame/js/script_min.js"></script>
<script src="../frame/js/util.js"></script>
<script>
    let showFragment = (page)=>{
        $('#external-frame').attr('src',page);
    };
</script>
</body>
</html>
